package com.mydomain.Bodega;

import com.mydomain.Bodega.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("invCierreList")
public class InvCierreList extends EntityQuery<InvCierre> {

	private static final String EJBQL = "select invCierre from InvCierre invCierre join  invCierre.subdepartamento s";

	private static final String[] RESTRICTIONS = {
		" cast(s.subdepCodigo as string) like concat(lower(#{invCierreList.invCierre.auxsubDep}),'%') ",
	};

	private InvCierre invCierre = new InvCierre();

	public InvCierreList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public InvCierre getInvCierre() {
		return invCierre;
	}
}
